#ifndef MCARCPARAMETRICWINDOW_H
#define MCARCPARAMETRICWINDOW_H

#include <QWidget>
#include <MCCommand.h>
#include <MCArcVisual.h>

namespace Ui {
class MCArcParametricWindow;
}

class MCArcParametricWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MCArcParametricWindow(MCCommand *command, MCArcVisual *arcVisual, QWidget *parent = nullptr);
    ~MCArcParametricWindow();

private slots:
    void on_x1_le_textChanged(const QString &arg1);

    void on_y1_le_textChanged(const QString &arg1);

    void on_radius_le_textChanged(const QString &arg1);

    void on_startAngle_le_textChanged(const QString &arg1);

    void on_endAngle_le_textChanged(const QString &arg1);

    void on_apply_btn_clicked();

    void on_terminate_btn_clicked();

private:

    bool isTextValid(QString text);
    void updateValue();

private:
    Ui::MCArcParametricWindow *ui;

    MCArc2D _arc;
    MCArcVisual *_arcVisual;
    MCCommand *_currentCommand;
};

#endif // MCARCPARAMETRICWINDOW_H
